﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Globalization;

/// <summary>
/// Summary description for Calendar
/// </summary>
public class Calendar
{
	public Calendar()
	{
		//
		// TODO: Add constructor logic here
		//
	}

    public DataView Last3Months()
    {
 
        DataTable table = new DataTable();
        table.Columns.Add("Month", typeof(string));
        table.Columns.Add("Offset", typeof(int));

        int nMonth = DateTime.Now.Month;

        for (int i = 0; i < 3; i++)
        {      
            table.Rows.Add( CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(nMonth-i),i);
        }
        return table.DefaultView;
    }
    
}